<?php
$isReloadable = true;
$isPopUp = true;
require_once "../../../pers/inc.config.php";
require_once OVF_FS_WEB_ROOT.'/app/_inc/inc.session.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/funct.html.php';
require_once OVF_FS_WEB_ROOT.'/app/_inc/class.ovfForm.php';


$oForm = new ovfForm('campagne');

$sSql = "SELECT ".$oForm->getCampiSelect()." FROM ovf_campagne C "
	." WHERE C.id_camp = ".reqVarInt('idCamp');
$objDB->query($sSql);
if (!$oForm->aCampiDB = $objDB->fetch()) {
	die("id. errato '".reqVar('idCamp')."'");
}
$oForm->db2form();

$oForm->oDocGen = new ovfDocGen();
$oForm->oDocGen->maxCol = 40;
$oForm->oDocGen->pdfIntestaz = $oForm->aCampiDB['C_descr'];
$txt12 = 'txt1';

$oForm->oDocGen->nuovaRiga();
$aCol = array('cla'=>'tit1');
$aCol['col']=40;
$aCol['alg']='C';
$aCol['txt']='CAMPAGNA';
$oForm->oDocGen->setCol($aCol);

$sPdf = $oForm->setDocGen();

$sPdf = $oForm->oDocGen->genPdf();

headerDownLoad(strlen($sPdf),"campagna".$oForm->aCampiDB['A_id_anag'].".pdf");
echo $sPdf;
exit();
